<template>
	<view class="playerTrading">
		<view class="details-header">
			<image @click="goBack"
				src="https://zsw-bimface-res.izsw.net/img/bim-community/%E5%B7%A6%E7%AE%AD%E5%A4%B4.png" mode="">
			</image>
			<view class="ass-title">
				活动任务区
			</view>
			<view style="width:50rpx"></view>
		</view>
		<view class="snatch-treasure" v-for="(item,i) in activityImg" :key="i">
			<image :src="item.url" @click="gotoActivity(item.link)" mode="">
			</image>
		<!-- 	<image src="https://zzboomcos-1317756147.cos.ap-nanjing.myqcloud.com/blind-box/43681715345253272.jpg" @click="snatch" mode="">
			</image>
			<image src="https://zzboomcos-1317756147.cos.ap-nanjing.myqcloud.com/blind-box/4541715345274512.jpg" @click="toranking" mode="">
			</image> -->
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				activityImg:[]
			}
		},
		onShow() {
			this.selectAll();
		},
		methods: {
			selectAll(){
				this.$http('/activity-img/selectAll/1', 'GET' ).then(res => {
					this.activityImg = res.data.data.list.filter(item => item.isHome === 2);
				})
			},
			goBack(){
				uni.reLaunch({
					url: '/pages/index/index'
				})
			},
			gotoActivity(url){
				uni.navigateTo({
					url: url
				})
			},
			// 签到
			// sign(){
			// 	uni.navigateTo({
			// 		url: "/pages/sign/index"
			// 	})
			// },
			// 一元夺宝
			// snatch(){
			// 	uni.navigateTo({
			// 		url: "/pages/TreasureHunt/index"
			// 	})
			// },
			// 排行榜
			// toranking() {
			// 	uni.navigateTo({
			// 		url: "/pages/ranking/index"
			// 	})
			// },
		}
	}
</script>

<style scoped lang="scss">
	page {
		background: url(../../static/bgColor.png) center/ cover no-repeat;

		.playerTrading {
			width: 100%;
			height: 100%;
			// padding: 20rpx 20rpx;
			.details-header {
				width: 100%;
				height: 50rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding-top: 20rpx;
			
				image:nth-child(1) {
					width: 40rpx;
					height: 40rpx;
					margin-left: 20rpx;
				}
				.ass-title{
					color: #fff;
					font-size:35rpx;
				}
			}
			.snatch-treasure{
				height: 230rpx;
				width: 90%;
				margin: 50rpx auto;
				image {
					width: 100%;
					height: 100%;
					border-radius: 15rpx;
					margin: 15rpx 0;
				}
			}
			
		}
	}
</style>